package com.qf.Mytest;

/**
 * @author wbzs,
 * @date 2022/10/27,
 * @time 15:57,
 */
public class test {
    public static void main(String[] args) {



        new Runnable() {
            @Override
            public void run() {
                for (int i = 0; i < 10; i++) {
                    System.out.println("只是线程"+Thread.currentThread().getName()+i);
                }
            }
        }.run();

        new Thread(){
            @Override
            public void run() {
                for (int i = 0; i < 10; i++) {
                    System.out.println("只是线程"+Thread.currentThread().getName()+i);
                }
            }
        }.start();


    }
}
